<%@ page pageEncoding="UTF-8"%>

<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/struts-nested" prefix="nested"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix='fmt'%>
<%@ taglib uri="/tags/trymore" prefix="tm"%>

<table class="table" width="100%" layoutH="111">
	<thead>
		<tr>
			<th align="center" width="30px">序号</th>
			<th align="center">用户姓名</th>
			<th align="center">部门</th>
			<th align="center">职务</th>
			<th align="center">学历</th>
			<th align="center">毕业院校</th>
			<th align="center">专业</th>
			<th align="center">联系方式</th>
			<th align="center">详细</th>
		</tr>
	</thead>
	<tbody>
		<logic:present name="datagrid">
			<logic:iterate name="datagrid" property="items" id="entity" indexId="idx">
				<tr ${idx % 2 == 1 ? 'style="background-color: #F5F5F5"' : ''}>
					<td>${idx+1}</td>
					<td style="text-align: center">${entity.userProfile ne null && entity.userProfile.fullName ne null ? entity.userProfile.fullName : entity.username}</td>
					<td style="text-align: center">${entity.userProfile ne null && entity.userProfile.department ne null ? entity.userProfile.department.dictKey : '/'}</td>
					<td style="text-align: center">${entity.userProfile ne null && entity.userProfile.jobTitle ne null ? entity.userProfile.jobTitle.dictKey : '/'}</td>
					<td style="text-align: center">${entity.userProfile ne null && entity.userProfile.education ne null ? entity.userProfile.education.dictKey : '/'}</td>
					<td style="text-align: center">${entity.userProfile ne null && entity.userProfile.school ne "" ? entity.userProfile.school : '/'}</td>
					<td style="text-align: center">${entity.userProfile ne null && entity.userProfile.majority ne "" ? entity.userProfile.majority : '/'}</td>
					<td style="text-align: center">${entity.userProfile ne null && entity.userProfile.mobilePhone ne "" ? entity.userProfile.mobilePhone : '/'}</td>
					<td>
						<a href="app/contacts.do?action=dialogContactPage&id=${entity.id}&op=view" target="dialog" 
							title="用户资料 - ${entity.username}" class="oplink" width="930" height="682" rel="contacts_dialog${entity.id}">资料详细</a>
					</td>
				</tr>
			</logic:iterate>
		</logic:present>
	</tbody>
</table>

<!-- Pagination -->
<div class="panelBar">
	<div class="pages">
		<span>显示</span>
		<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
			<option value="20" ${pagingBean ne null && pagingBean.pageSize eq 20 ? 'selected="selected"' : ''}>20</option>
			<option value="50" ${pagingBean ne null && pagingBean.pageSize eq 50 ? 'selected="selected"' : ''}>50</option>
			<option value="100" ${pagingBean ne null && pagingBean.pageSize eq 100 ? 'selected="selected"' : ''}>100</option>
			<option value="200" ${pagingBean ne null && pagingBean.pageSize eq 200 ? 'selected="selected"' : ''}>200</option>
		</select>
		<span>条，共${pagingBean ne null ? pagingBean.totalItems : 0}条</span>
	</div>
	<div class="pagination" targetType="navTab" totalCount="${pagingBean ne null ? pagingBean.totalItems : 0}" numPerPage="${pagingBean ne null ? pagingBean.pageSize : 20}" pageNumShown="${pagingBean ne null ? pagingBean.pageNumShown : 10}" currentPage="${pagingBean ne null ? pagingBean.currentPage : 1}"></div>
</div>